package FIleInpuSteam;

import java.io.*;

public class name {
    public static void main(String[] args)  {
        //1创建一个字节连接通道与源文件进行接通
        try(FileInputStream  fi= new FileInputStream("D:\\code\\java_learning\\Math\\src\\FIleInpuSteam\\wuzi.txt ");
            //使用InputStreamReader()进行文件的修改
            Reader gbk = new InputStreamReader(fi,"GBK");
            //将将编译后的文件转换成缓冲区增加系统调换
            BufferedReader br = new BufferedReader(gbk);
        ) {
            String len;
            //在BufferedReader()中的readLine（）是String类型的
            while ((len=br.readLine())!=null){
                System.out.println(len);
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}